!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).IMask={})}(this,function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e){return t(e={exports:{}},e.exports),e.exports}function u(t){return t&&t.Math==Math&&t}function i(t){try{return!!t()}catch(t){return!0}}function r(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}function f(t){if(null==t)throw TypeError("Can't call method on "+t);return t}function h(t){return x(f(t))}function s(t){return"object"==typeof t?null!==t:"function"==typeof t}function a(t,e){if(!s(t))return t;var n,u;if(e&&"function"==typeof(n=t.toString)&&!s(u=n.call(t)))return u;if("function"==typeof(n=t.valueOf)&&!s(u=n.call(t)))return u;if(!e&&"function"==typeof(n=t.toString)&&!s(u=n.call(t)))return u;throw TypeError("Can't convert object to primitive value")}function l(t,e){return P.call(t,e)}function o(t){if(!s(t))throw TypeError(String(t)+" is not an object");return t}function c(e,n){try{N(F,e,n)}catch(t){F[e]=n}return n}var p,d,v,k,g,y,m,_,A,b,C="object",F=u(typeof globalThis==C&&globalThis)||u(typeof window==C&&window)||u(typeof self==C&&self)||u(typeof e==C&&e)||Function("return this")(),E=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),S={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,B={f:D&&!S.call({1:2},1)?function(t){var e=D(this,t);return!!e&&e.enumerable}:S},w={}.toString,M="".split,x=i(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==(e=t,w.call(e).slice(8,-1))?M.call(t,""):Object(t);var e}:Object,P={}.hasOwnProperty,O=F.document,I=s(O)&&s(O.createElement),T=!E&&!i(function(){return 7!=Object.defineProperty(I?O.createElement("div"):{},"a",{get:function(){return 7}}).a}),V=Object.getOwnPropertyDescriptor,j={f:E?V:function(t,e){if(t=h(t),e=a(e,!0),T)try{return V(t,e)}catch(t){}if(l(t,e))return r(!B.f.call(t,e),t[e])}},R=Object.defineProperty,L={f:E?R:function(t,e,n){if(o(t),e=a(e,!0),o(n),T)try{return R(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},N=E?function(t,e,n){return L.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t},z=n(function(t){var e="__core-js_shared__",n=F[e]||c(e,{});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.1.3",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),U=z("native-function-to-string",Function.toString),H=F.WeakMap,Y="function"==typeof H&&/native code/.test(U.call(H)),Z=0,G=Math.random(),W=z("keys"),q={},$=F.WeakMap;m=Y?(p=new $,d=p.get,v=p.has,k=p.set,g=function(t,e){return k.call(p,t,e),e},y=function(t){return d.call(p,t)||{}},function(t){return v.call(p,t)}):(_=W[A="state"]||(W[A]=(b=A,"Symbol("+String(void 0===b?"":b)+")_"+(++Z+G).toString(36))),q[_]=!0,g=function(t,e){return N(t,_,e),e},y=function(t){return l(t,_)?t[_]:{}},function(t){return l(t,_)});function K(t){return"function"==typeof t?t:void 0}function J(t,e){return arguments.length<2?K(at[t])||K(F[t]):at[t]&&at[t][e]||F[t]&&F[t][e]}function Q(t){return isNaN(t=+t)?0:(0i;)l(u,n=e[i++])&&(~pt(r,n)||r.push(n));return r}function nt(t,e){for(var n=yt(e),u=L.f,i=j.f,r=0;ru&&(i=i.slice(0,u)),l?r+i:i+r)}}var Mt="".repeat||function(t){var e=String(f(this)),n="",u=Q(t);if(u<0||u==1/0)throw RangeError("Wrong number of repetitions");for(;0>>=1)&&(e+=e))1&u&&(n+=e);return n},xt=Math.ceil,Pt={start:wt(!1),end:wt(!0)},Ot=J("navigator","userAgent")||"",It=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(Ot),Tt=Pt.end;it({target:"String",proto:!0,forced:It},{padEnd:function(t,e){return Tt(this,t,1=t||!this.value.length)return"";var e=this.value[0];return this.value=this.value.slice(1),e}},{key:"state",get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(t){Object.assign(this,t)}}]),u}(),oe=function(){function e(t){Rt(this,e),this._value="",this._update(t),this.isInitialized=!0}return Nt(e,[{key:"updateOptions",value:function(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}},{key:"_update",value:function(t){Object.assign(this,t)}},{key:"reset",value:function(){this._value=""}},{key:"resolve",value:function(t){return this.reset(),this.append(t,{input:!0},""),this.doCommit(),this.value}},{key:"nearestInputPos",value:function(t){return t}},{key:"extractInput",value:function(t,e){var n=0=t||!this.chunks.length)return"";for(var e=t-this.from,n=0;nthis.to?s+=i[o.length-1]:s+=t[a]}return s}},{key:"doValidate",value:function(){var t,e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;for(var n=Kt(this.boundaries(e),2),u=n[0],i=n[1],r=arguments.length,s=new Array(r),a=0;a